CSharpTest.Net
DbGuid Constructor(Byte[],Int32)
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Data Namespace > DbGuid Structure > DbGuid Constructor : DbGuid Constructor(Byte[],Int32)

bytes
offset

Glossary Item Box

Constructs a DbGuid from an array of 16 (or more) bytes beginning at the offset supplied.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal bytes() As Byte, _
   ByVal offset As Integer _
)
C# 
public DbGuid( 
   byte[] bytes,
   int offset
)

Parameters

bytes
offset

Example

Library/Library.Test/TestDbGuid.cs

C#Copy Code
DbGuid testA = DbGuid.NewGuid();
byte[] bytes = new byte[1024];
testA.ToByteArray(bytes, 512);
DbGuid testB = new DbGuid(bytes, 512);
Assert.AreEqual(testA, testB);
VB.NETCopy Code
Dim testA As DbGuid = DbGuid.NewGuid()
Dim bytes As Byte() = New Byte(1024) {}
testA.ToByteArray(bytes, 512)
Dim testB As New DbGuid(bytes, 512)
Assert.AreEqual(testA, testB)

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys